package com.hethongviet.job.helpers;

import com.hethongviet.job.models.Task;

public class JSONAttributes
{
	/* For Users */
	public static final String USER_ID = "FK_UserID";
	public static final String USER_USERNAME = "UserName";
	public static final String USER_PASSWORD = "PasswordLogin";
	public static final String USER_MEMBER_ID = "FK_MemberID";
	public static final String USER_IS_MANAGER_JOB = "IsManagerJob";
	public static final String USER_COMPANY_NAME = "CompanyName";
	public static final String USER_MEMBER_CODE = "MemberCode";
	public static final String USER_MEMBER_NAME = "MemberName";
	public static final String USER_IMAGE = "ImageUser";

	/* For Projects */
	public static final String PROJECT_ID = "PK_ID";
	public static final String PROJECT_CODE = "JobCode";
	public static final String PROJECT_NAME = "JobName";
	public static final String PROJECT_DECRIPTION = "JobDesc";
	public static final String PROJECT_GROUP_NAME = "JobGroupName";
	public static final String PROJECT_MEMBER_CREATE_NAME = "MemberCreateName";
	public static final String PROJECT_MANAGER_NAME = "ManagerName";
	public static final String PROJECT_DATE_CREATE = "DateCreate";
	public static final String PROJECT_DATE_START = "DateStart";
	public static final String PROJECT_DATE_FINISH = "DateFin";
	public static final String PROJECT_NOTE = "Note";

	/* For Tasks */
	public static final String TASK_ID = "FK_JobItemID";
	public static final String TASK_PROJECT_ID = "FK_JobID";
	public static final String TASK_PROJECT_CODE = "JobCode";
	public static final String TASK_PROJECT_NAME = "JobName";
	public static final String TASK_CODE = "JobItemCode";
	public static final String TASK_NAME = "JobItemName";
	public static final String TASK_DECRIPTION = "JobItemDesc";
	public static final String TASK_DATE_CREATE = "DateCreate";
	public static final String TASK_MEMBER_ASSIGN = "MemberAssign";
	public static final String TASK_IMPORTANT_LEVEL = "ImportantLevel";
	public static final String TASK_DATE_REQUEST_START = "DateTimeRQStart";
	public static final String TASK_DATE_REQUEST_FINISH = "DateTimeRQFin";
	public static final String TASK_DATE_ACTUAL_START = "DateTimeActStart";
	public static final String TASK_DATE_ACTUAL_FINISH = "DateTimeActFin";
	public static final String TASK_LATITUDE = "Latitude";
	public static final String TASK_LATITUDE_AFTER = "LatitudeAfter";
	public static final String TASK_NOTE = "Note";
	public static final String TASK_STATUS = "StatusJobItem";
	public static final String TASK_IMAGE_START = "ImageWork";
	public static final String TASK_IMAGE_FINISH = "ImageWorkAfter";
	public static final String TASK_IMAGE_DATA = "ImageWorkByte";
	public static final String TASK_ATTACHMENT_NAME = "AttachmentName";
	public static final String TASK_GUIDE_TEXT = "IntroductionText";

	/* For comments */
	public static final String COMMENT_ATTACH_NAME = "AttachmentName";
	public static final String COMMENT_CONTENT = "Comment";
	public static final String COMMENT_TIME_CREATE = "DateTimeRec";
	public static final String COMMENT_IMAGE_WORK = "ImageWork";
	public static final String COMMENT_MEMBER_CODE = "MemberCode";
	public static final String COMMENT_MEMBER_NAME = "MemberName";
	public static final String COMMENT_ID = "PK_ID";
	public static final String COMMENT_AUDIO = "AudioName";

	public static final String STATUS_JUST_CREATE = "JustCreate";
	public static final String STATUS_DELAY_START = "DelayStart";
	public static final String STATUS_DELAY_FINISH = "DelayFinish";
	public static final String STATUS_IN_PROCESS = "InProcess";
	public static final String STATUS_FINISH = "Finish";

	public static final int getStatus(String statusString)
	{
		if (statusString.equalsIgnoreCase(STATUS_DELAY_FINISH)) return Task.STATUS_DELAY_FINISH;
		else if (statusString.equalsIgnoreCase(STATUS_DELAY_START)) return Task.STATUS_DELAY_START;
		else if (statusString.equalsIgnoreCase(STATUS_FINISH)) return Task.STATUS_FINISH;
		else if (statusString.equalsIgnoreCase(STATUS_IN_PROCESS)) return Task.STATUS_IN_PROCESS;
		else return Task.STATUS_JUST_CREATE;
	}

}
